module.exports = {
  lintOnSave: false,

  css: {
    loaderOptions: {
      postcss: {
        postcssOptions: {
          plugins: [
            require("postcss-pxtorem")({
              rootValue: 192,
              propList: ["border"],
              exclude: /node_modules/i,
            }),
            require("tailwindcss"),
            require("autoprefixer"),
          ],
        },
      },
    },
  },
  devServer: {
    port: "8080",
    proxy: {
      "/api": {
        target: "http://127.0.0.1:7001",
        changeOrigin: true,
        pathRewrite: {
          "^/api": "",
        },
      },
    },
  },
  configureWebpack: (config) => {
    config.module.rules.push({
      test: /\.worker.js$/,
      use: {
        loader: "worker-loader",
        options: { inline: true, name: "workerName.[hash].js" },
      },
    });
  },
  parallel: false,
  chainWebpack: (config) => {
    config.output.globalObject("this");
  },
};
